package com.woniuxy.exam.common.enums.impl;

import com.woniuxy.exam.common.enums.IResultCode;
import lombok.Getter;

/**
 * 业务状态码
 */
@Getter
public enum BusinessCode implements IResultCode {
    // 枚举对象：描述状态码、状态码的描述
    VERRIFY_CODE_IS_NULL(21000,"验证码为空！"),
    VERRIFY_CODE_ERROR(21001,"验证码错误！"),
    LOGIN_FAILED(21002,"用户名或密码错误，登录失败！"),
    EMAIL_EXISTS(21003,"邮箱已存在，注册失败！"),
    USER_EXISTS(21004,"用户名已存在，注册失败！"),
    STORAGE_IS_NOT_ENOUGH(21005,"商品库存不足！"),
    ORDER_REPEAT_SUBMIT(21006,"请勿重复提交订单！");
    private int code;
    private String message;
    // 枚举构造函数，默认是private
     BusinessCode(int code, String message) {
        this.code = code;
        this.message = message;
    }
}
